
public class VarEntityBlock extends EntityBlock{

	private boolean isArray;
	private Modifier modifier;
	private SimpleNode type;
	private boolean isFormalParam = false;
	private boolean isFieldVariable = false;

	public void setIsFormalParam() {
		isFormalParam = true;
	}

	public void setIsFieldVariable() {
		isFieldVariable = true;
	}

	public VarEntityBlock(){
		isArray = false;
	}
	public boolean isArray() {
		return isArray;
	}
	public void setArray(boolean isArray) {
		this.isArray = isArray;
	}

	public void setModifier(Modifier modifier) {
		this.modifier = modifier;
	}
	public Modifier getModifier() {
		return this.modifier;
	}
	public SimpleNode getType() {
		return type;
	}
	public void setType(SimpleNode type) {
		this.type = type;
	}

	public void print(String prefix) {
		if (isFieldVariable) {
			System.out.print(prefix + "Field_declaration");
		} else if (isFormalParam) {
			System.out.print(prefix + "Parameter");
		} else {
			System.out.print(prefix + "Local variable");
		}
 		if (isArray) {
			System.out.print(prefix + " New_Array");
 		} else { 
			System.out.print(prefix + " New_Variable"); 
		}
                System.out.print("=> Name: " + nameBlock.getName() + ", Type:"); 
		this.getType().dump(" ");
		if (modifier != null) {
			System.out.print(", Visibility: ");
			this.modifier.print("");
		}

		super.print(prefix);
		if (type != null) {
			//type.dump(prefix + " ");
		}
		if (modifier != null) {
			//modifier.print(prefix + " ");
		}
	}
}
